@import "global";

#root, #container {
    height: 100%;
}

body {
  overflow:scroll;
}

@define-mixin hover {
    cursor: pointer;
    transition: .2s all ease;
    &:hover {
        opacity: 0.9;
    }
}

@define-mixin shadow {
    box-shadow: 0 2px 4px rgba(0, 0 , 0, .2);
}

button {
    border: 0;
    &:focus {
        outline: 1px dotted #aaa;
    }
}

.hover {
    @mixin hover;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #555;
    color: white;
    @mixin shadow;
    @mixin hover;
    &.button-cube {
        padding: 7px 14px;
        border-radius: 3px;
        .fa {
            font-size: 14px;
            margin-right: 5px;
        }
    }
    &.button-circle {
        width: 31px;
        height: 31px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        .fa {
            font-size: 15px;
        }
    }
}

#tooltip {
    left: 0;
    right: 0;
    top: 0;
    height: 35px;
    position: fixed;
    margin: 0 320px;
    margin-top: 20px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    &.error {
        .content {
            background-color: #980000;
        }
    }
    .content {
        @mixin shadow;
        padding: 8px 18px;
        text-align: center;
        color: white;
        background-color: #00B106;
        border-radius: 30px;
        font-size: 14px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        i {
            font-size: 20px;
        }
        .action {
            margin-left: 10px;
            cursor: pointer;
            text-decoration: underline;
        }
    }
}

#menu {
    padding: 24px;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 4;
    .theme, .focus, .fullscreen {
        display: none;
    }
    &.close {
        .tool {
            .help, .setting {
                display: none;
            }
            .theme, .focus, .fullscreen {
                display: block;
            }
        }
    }
    .tool {
        position: fixed;
        display: flex;
        li {
            margin-right: 20px;
            margin-top: 6px;
            &.inbox {
                margin-top: 0;
                .button {
                    width: 40px;
                    height: 40px;
                    line-height: 40px;
                    background-color: #a20000;
                    .fa {
                        margin-top: 1px;
                        font-size: 18px;
                    }
                }
            }
            &.active {
                .button {
                    background-color: #a20000;
                }
            }
        }
    }
}

#list-wrap {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 3;
    background-color: #fff;
    .logo {
        opacity: 0.7;
        display: block;
        width: 250px;
        margin: 0 auto;
        margin-top: 80px;
    }
    .search-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 40px;
        font-size: 24px;
        color: #aaa;
        .fa {
            margin-left: 10px;
        }
        input {
            width: 150px;
            font-size: 18px;
            text-align: center;
            border: 0;
            color: #aaa;
            background-color: white;
            &::placeholder {
                /*color: #ccc;*/
                font-style: italic;
            }
        }
    }
    .list {
        margin: 0 auto;
        width: 750px;
        &.article {
            .list-content {
                .item.draft {
                    display: none;
                }
            }
        }
        &.draft {
            .list-content {
                .item.article {
                    display: none;
                }
            }
        }
        .empty {
            font-size: 90px;
            margin: 0 auto;
            width: 100%;
            text-align: center;
            opacity: 0.08;
            margin-top: 50px;
            text-shadow: 0 5px rgba(0,0,0,0.3);
        }
        .list-nav {
            margin-top: 60px;
            overflow: auto;
            justify-content: center;
            display: flex;
            align-items: center;
            font-weight: bold;
            li {
                padding: 10px 17px;
                margin: 20px;
                color: #555;
                @mixin hover;
                .count {
                    color: #aaa;
                    margin-left: 5px;
                }
                .fa {
                    margin-right: 7px;
                    font-size: 16px;
                }
                &.selected {
                    color: white;
                    @mixin shadow;
                    border-radius: 3px;
                    background-color: #444;
                    text-shadow: 0 2px rgba(0,0,0,0.1);
                }
            }
        }
        .list-content {
            margin-top: 30px;
            margin-bottom: 120px;
            a:last-child {
                .item {
                    border: 0;
                }
            }
            .item {
                padding: 20px 20px;
                font-size: 16px;
                display: flex;
                justify-content: space-between;
                border-radius: 4px;
                margin-bottom: 10px;
                &:hover {
                    background-color: #f9f9f9;
                }
                &.selected {
                    .title {
                        color: #555;
                    }
                }
                .title {
                    color: #888;
                    margin-left: -13px;
                    padding-left: 9px;
                    border-left: 4px solid transparent;
                    box-sizing: border-box;
                    font-weight: bold;
                }
                .date {
                    font-size: 14px;
                    color: #bbb;
                }
            }
        }
        .tags-content {
            margin-top: 50px;
            margin-left: 9px;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            li {
                font-size: 16px;
                font-weight: bold;
                color: #bbb;
                padding: 10px 20px;
                border-radius: 3px;
                cursor: pointer;
                &:hover {
                    background-color: #f9f9f9;
                }
            }
        }
    }
}

#right {
    padding: 30px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 4;
    float: right;
    li {
        float: right;
        margin-left: 20px;
        .button {
            &.deploy {
                background-color: #777;
            }
            &.remove {
                background-color: #a20000;
            }
        }
    }
}

#header {
    margin: 0 auto;
    margin-top: 85px;
    z-index: 1;
    position: relative;
    text-align: center;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: .3s all ease;
    width: 100%;
    max-width: 700px;
    &.edit {
        .title {
            i {
                display: inline-block;
                margin-left: -40px;
                margin-top: 4px;
                color: #ccc;
                position: absolute;
            }
            span {
                border-bottom: 2px dashed #ccc;
            }
        }
    }
    .title {
        i {
            display: none;
        }
        &.readonly {
            color: #a20000;
        }
        margin: 0 auto;
        font-size: 36px;
        font-weight: bold;
        color: #555;
    }
    .tag {
        font-style: italic;
        border: 1px solid #eee;
        border-radius: 3px;
        padding: 3px 10px;
        margin: 10px 4px;
        color: #aaa;
        font-size: 12px;
        display: inline-block;
    }
}

.content-editor-wrap.focus-mode #content-editor {
  .ace_line_group {
      /*filter: blur(1px);*/
      opacity: 0.2;
      &.no-blur {
          /*filter: blur(0);*/
          opacity: 1;
      }
  }
}

#config-editor, #content-editor {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    .ace_line_group {
      border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
      box-sizing: border-box;
      transition: .1s all ease;
    }
    .ace_cursor {
        color: #888;
        border-left: 2px solid;
        transition: opacity 0.3s ease-in-out;
        /*margin-top: 4px;
        height: 23px !important;*/
    }
    .ace_marker-layer {
        .ace_selection {
            background: orange;
            opacity: 0.1;
            border-radius: 0;
        }
        .ace_active-line {
            background: #fbfbfb;
        }
    }
    .ace_text-input {
        letter-spacing: 3px;
        margin-left: 0px;
        background: #fbfbfb !important;
    }
}

#editor-toolbar {
    position: fixed;
    z-index: 2;
    transition: .1s all ease;
    opacity: 0.5;
    display: flex;
    flex-direction: column;
    &:hover {
        opacity: 1;
    }
    &.select {
        flex-direction: row;
        li {
            margin-right: 10px;
        }
    }
    .extend {
        &:hover {
            .subaction {
                display: flex !important;
            }
        }
        .subaction {
            display: none !important;
        }
    }
    li {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 30px;
        height: 30px;
        background-color: #eee;
        border-radius: 50%;
        margin-bottom: 10px;
        transition: .1s all ease;
        &.show {
            border: 2px solid #aaa;
            color: #aaa;
        }
        &.action {
            /*@mixin hover;*/
            /*@mixin shadow;*/
            box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 1);
            display: none;
            opacity: 0;
            color: white;
            background-color: #555;
            border: 2px solid #555;
            position: relative;
            &:hover {
                background-color: white;
                color: #555;
            }
            &.image {
                input {
                    position: absolute;
                    width: 100%;
                    left: 0;
                    bottom: 0;
                    right: 0;
                    top: 0;
                    opacity: 0;
                }
            }
        }
    }
    &:hover {
        li {
            &.action {
                display: flex;
                opacity: 1;
            }
        }
    }
}

.welcome-wrap {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    .logo {
        opacity: 0.7;
        margin-top: 200px;
        display: block;
        width: 250px;
    }
    .slogan {
        opacity: 0.7;
        font-size: 32px;
        margin-top: 30px;
    }
    .guide {
        display: flex;
        .getstart, .document {
            color: white;
            margin-top: 40px;
            font-weight: bold;
            border-radius: 50px;
            padding: 10px 20px;
            border: 2px solid #333;
            background-color: #555;
            .fa {
                font-size: 16px;
                margin-right: 5px;
            }
        }
        .document {
            margin-right: 30px;
            border: 2px solid #630000;
            background-color: #a20000;
        }
    }
}

#loading {
    font-size: 46px;
    color: #aaa;
    margin-top: 20px;
}

#confirm {
    position: absolute;
    left: 27px;
    top: 75px;
    background-color: #555;
    border-radius: 3px;
    z-index: 3;
    color: #fff;
    text-align: center;
    padding: 8px 10px;
    &:before {
        content: "";
        position: absolute;
        left: 50%;
        margin-left: -9px;
        top: -7px;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 0 10px 10px 10px;
        border-color: transparent transparent #555 transparent;
    }
}

#modal {
    position: fixed;
    z-index: 999;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    .overlay {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: white;
        opacity: 0.95;
    }
    .content {
        z-index: 1;
        margin-top: 200px;
        text-align: center;
        .title {
            font-size: 22px;
            display: flex;
            justify-content: center;
            align-items: center;
            color: green;
            font-weight: bold;
            margin-bottom: 20px;
            .fa {
                font-size: 32px;
                margin-right: 10px;
            }
        }
        .name {
            text-align: center;
            padding: 10px 20px;
            border-radius: 50px;
            color: #005b37;
            background-color: white;
            border: 2px solid #eee;
            &::placeholder {
                opacity: 0.5;
            }
        }
        .confirm {
            .fa {
                margin-right: 8px;
            }
            width: 50px;
            margin: 0 auto;
            display: block;
            border-radius: 50px;
            padding: 8px 25px;
            border: 2px solid green;
            background-color: #00aa35;
            color: white;
            margin-top: 20px;
        }
    }
}
